Skip to content

Conversation

@sudo-shashank
Copy link
Contributor

@sudo-shashank sudo-shashank commented May 22, 2025

Summary of changes

Changes introduced in this pull request:

  • Add basic k6 e2e test and integrate in CI workflow

Checks added:

  • check paths
  • check buttons
  • check links
  • check footer

Reference issue to close (if applicable)

Closes #179

Other information and links

Change checklist

  • I have performed a self-review of my own code,
  • I have made corresponding changes to the documentation. All new code
    adheres to the team's
    documentation standards,
  • I have added tests that prove my fix is effective or that my feature works
    (if possible),
  • I have made sure the CHANGELOG is up-to-date. All user-facing changes
    should be reflected in this document.

@codecov-commenter
Copy link

codecov-commenter commented May 22, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 10.07%. Comparing base (517b0a3) to head (af7f70f).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #229   +/-   ##
=======================================
  Coverage   10.07%   10.07%           
=======================================
  Files          27       27           
  Lines        1568     1568           
=======================================
  Hits          158      158           
  Misses       1410     1410           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@sudo-shashank sudo-shashank marked this pull request as ready for review May 22, 2025 08:29
@sudo-shashank sudo-shashank requested a review from a team as a code owner May 22, 2025 08:29
@sudo-shashank
Copy link
Contributor Author

These are just basic test, I will be adding more comprehensive tests to check the following in a separate PR:

  • Check faucet Send for FIL and tFIL
  • Check Rate Limiter for both calibnet and mainnet
  • Check error alerts

@sudo-shashank sudo-shashank changed the title Browser testing with k6 E2E testing with k6 May 22, 2025
Copy link
Member

@LesnyRumcajs LesnyRumcajs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please add a README to e2e on executing the tests?

@LesnyRumcajs
Copy link
Member

@sudo-shashank Is the CI doing actually any checks?

Run grafana/run-k6-action@v1
🔍 Validating test run files.
🧪 Found 1 valid k6 tests out of total 1 test files.
  1. /home/runner/work/forest-explorer/forest-explorer/e2e/script.js
🤖 Running test: k6 run --address= /home/runner/work/forest-explorer/forest-explorer/e2e/script.js
🚨 time="2025-05-23T08:19:22Z" level=error msg="Uncaught (in promise) navigating frame to \"[http://127.0.0.1:8787/\](http://127.0.0.1:8787//)": navigating to \"[http://127.0.0.1:8787/\](http://127.0.0.1:8787//)": timed out after 30s" executor=shared-iterations scenario=ui


  █ THRESHOLDS 

    checks
    ✓ 'rate==1.0' rate=0.00%


  █ TOTAL RESULTS 

    checks_total.......................: 0     0/s
    checks_succeeded...................: 0.00% 0 out of 0
    checks_failed......................: NaN%  0 out of 0

on my machine:

  █ TOTAL RESULTS

    checks_total.......................: 61      1.576153/s
    checks_succeeded...................: 100.00% 61 out of 61
    checks_failed......................: 0.00%   0 out of 61

    ✓ GET / → 200
    ✓ Button "To faucet list" on "/" exists
    ✓ Button "To faucet list" on "/" is visible
    ✓ Button "To faucet list" on "/" is enabled
    ✓ Link "Filecoin Slack" on "/" exists
    ✓ Link "Filecoin Slack" on "/" is visible
    ✓ Link "Filecoin Slack" on "/" has valid href
    ✓ Link "documentation" on "/" exists
    ✓ Link "documentation" on "/" is visible
...
...

I'm also wondering why are the tests so slow - there aren't that many pages to visit.

@sudo-shashank sudo-shashank marked this pull request as draft May 23, 2025 11:26
@sudo-shashank sudo-shashank marked this pull request as ready for review May 26, 2025 13:24
@sudo-shashank
Copy link
Contributor Author

sudo-shashank commented May 26, 2025

@LesnyRumcajs @hanabi1224 Fixed CI run timeout issue and also improved performance

In CI:
Screenshot 2025-05-26 at 7 01 01 PM

On my machine:
Screenshot 2025-05-26 at 7 00 18 PM

LesnyRumcajs
LesnyRumcajs previously approved these changes May 26, 2025
Copy link
Member

@LesnyRumcajs LesnyRumcajs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's still a bit slow-ish but we can iterate on it later. Definitely better and more comprehensive than the previous solution. Good job!

@sudo-shashank sudo-shashank added this pull request to the merge queue May 27, 2025
@sudo-shashank sudo-shashank disabled auto-merge May 27, 2025 03:25
@sudo-shashank sudo-shashank removed this pull request from the merge queue due to a manual request May 27, 2025
@sudo-shashank sudo-shashank added this pull request to the merge queue May 27, 2025
Merged via the queue into main with commit d84af12 May 27, 2025
4 checks passed
@sudo-shashank sudo-shashank deleted the shashank/e2e-test branch May 27, 2025 03:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Browser testing with k6

4 participants